kr_adjust_stack_sizes = true
kr_optimization_tech_card_name = "space-science-pack"

require("util")
require("prototypes.custom-inputs")
require("prototypes.damage-types")
require("prototypes.equipment-grids")
require("prototypes.fluids")
require("prototypes.gui-styles")
require("prototypes.shortcuts")
require("prototypes.sounds")
require("prototypes.tips-and-tricks")
require("prototypes.virtual-signals")

require("prototypes.buildings.active-provider-strongbox")
require("prototypes.buildings.active-provider-warehouse")
require("prototypes.buildings.advanced-assembling-machine")
require("prototypes.buildings.advanced-chemical-plant")
require("prototypes.buildings.advanced-furnace")
require("prototypes.buildings.advanced-lab")
require("prototypes.buildings.advanced-radar")
require("prototypes.buildings.advanced-solar-panel")
require("prototypes.buildings.advanced-steam-turbine")
require("prototypes.buildings.air-purifier")
require("prototypes.buildings.antimatter-reactor")
require("prototypes.buildings.atmospheric-condenser")
require("prototypes.buildings.big-roboport")
require("prototypes.buildings.big-storage-tank")
require("prototypes.buildings.bio-lab")
require("prototypes.buildings.buffer-strongbox")
require("prototypes.buildings.buffer-warehouse")
require("prototypes.buildings.crusher")
require("prototypes.buildings.electric-mining-drill-mk2")
require("prototypes.buildings.electric-mining-drill-mk3")
require("prototypes.buildings.electrolysis-plant")
require("prototypes.buildings.energy-storage")
require("prototypes.buildings.express-loader")
require("prototypes.buildings.advanced-loader")
require("prototypes.buildings.advanced-transport-belt")
require("prototypes.buildings.advanced-underground-belt")
require("prototypes.buildings.advanced-splitter")
require("prototypes.buildings.fast-loader")
require("prototypes.buildings.filtration-plant")
require("prototypes.buildings.flare-stack")
require("prototypes.buildings.fuel-refinery")
require("prototypes.buildings.fusion-reactor")
require("prototypes.buildings.gas-power-station")
require("prototypes.buildings.greenhouse")
require("prototypes.buildings.huge-storage-tank")
require("prototypes.buildings.intergalactic-transceiver")
require("prototypes.buildings.laser-artillery-turret")
require("prototypes.buildings.legacy-steel-pipe-to-ground")
require("prototypes.buildings.loader")
require("prototypes.buildings.logo")
require("prototypes.buildings.matter-associator")
require("prototypes.buildings.matter-plant")
require("prototypes.buildings.passive-provider-strongbox")
require("prototypes.buildings.passive-provider-warehouse")
require("prototypes.buildings.planetary-teleporter")
require("prototypes.buildings.quantum-computer")
require("prototypes.buildings.quarry-drill")
require("prototypes.buildings.railgun-turret")
require("prototypes.buildings.requester-strongbox")
require("prototypes.buildings.requester-warehouse")
require("prototypes.buildings.research-server")
require("prototypes.buildings.rocket-turret")
require("prototypes.buildings.sentinel")
require("prototypes.buildings.shelter")
require("prototypes.buildings.singularity-beacon")
require("prototypes.buildings.singularity-lab")
require("prototypes.buildings.small-roboport")
require("prototypes.buildings.spaceship-material-fabricator-1")
require("prototypes.buildings.spaceship-material-fabricator-2")
require("prototypes.buildings.spaceship-reactor")
require("prototypes.buildings.spaceship-research-computer")
require("prototypes.buildings.stabilizer-charging-station")
require("prototypes.buildings.steel-pipe")
require("prototypes.buildings.steel-pipe-to-ground")
require("prototypes.buildings.steel-pump")
require("prototypes.buildings.storage-strongbox")
require("prototypes.buildings.storage-warehouse")
require("prototypes.buildings.strongbox")
require("prototypes.buildings.superior-inserter")
require("prototypes.buildings.superior-loader")
require("prototypes.buildings.superior-long-inserter")
require("prototypes.buildings.superior-splitter")
require("prototypes.buildings.superior-substation")
require("prototypes.buildings.superior-transport-belt")
require("prototypes.buildings.superior-underground-belt")
require("prototypes.buildings.tesla-coil")
require("prototypes.buildings.warehouse")
require("prototypes.buildings.wind-turbine")

require("prototypes.categories.ammo-categories")
require("prototypes.categories.equipment-categories")
require("prototypes.categories.fuel-categories")
require("prototypes.categories.item-subgroups")
require("prototypes.categories.recipe-categories")
require("prototypes.categories.resource-categories")

require("prototypes.equipment.additional-engine-equipment")
require("prototypes.equipment.advanced-additional-engine-equipment")
require("prototypes.equipment.advanced-exoskeleton-equipment")
require("prototypes.equipment.antimatter-reactor-equipment")
require("prototypes.equipment.big-solar-panel-equipment")
require("prototypes.equipment.big-superior-solar-panel-equipment")
require("prototypes.equipment.energy-absorber-equipment")
require("prototypes.equipment.energy-shield-mk3-equipment")
require("prototypes.equipment.energy-shield-mk4-equipment")
require("prototypes.equipment.fusion-reactor-equipment")
require("prototypes.equipment.personal-laser-defense-mk2-equipment")
require("prototypes.equipment.personal-laser-defense-mk3-equipment")
require("prototypes.equipment.personal-laser-defense-mk4-equipment")
require("prototypes.equipment.portable-generator-equipment")
require("prototypes.equipment.small-portable-generator-equipment")
require("prototypes.equipment.superior-exoskeleton-equipment")
require("prototypes.equipment.superior-night-vision-equipment")
require("prototypes.equipment.superior-solar-panel-equipment")
require("prototypes.equipment.vehicle-roboport-equipment")

require("prototypes.explosions.beacon-matter-explosion")
require("prototypes.explosions.impulse-rifle-beam")
require("prototypes.explosions.large-matter-explosion")
require("prototypes.explosions.laser-explosion")
require("prototypes.explosions.laser-explosion-gunshot")
require("prototypes.explosions.laser-explosion-gunshot-smoke-fast")
require("prototypes.explosions.matter-explosion")
require("prototypes.explosions.matter-fire-smoke")
require("prototypes.explosions.matter-shockwave")
require("prototypes.explosions.medium-matter-explosion")
require("prototypes.explosions.rail-matter-explosion")
require("prototypes.explosions.small-matter-explosion")

require("prototypes.items.ammo")
require("prototypes.items.capsules")
require("prototypes.items.guns")
require("prototypes.items.items")
require("prototypes.items.jackhammer")
require("prototypes.items.tech-cards")

require("prototypes.particles.virus-capsule-metal-particle")
require("prototypes.particles.welding-particle")

require("prototypes.projectiles.antimatter-artillery-projectile")
require("prototypes.projectiles.antimatter-bomb-wave")
require("prototypes.projectiles.antimatter-bomb-wave-spawns-fire-smoke-explosion")
require("prototypes.projectiles.antimatter-bomb-wave-spawns-matter-shockwave-explosion")
require("prototypes.projectiles.antimatter-bomb-wave-spawns-matter-smoke")
require("prototypes.projectiles.antimatter-rocket-projectile")
require("prototypes.projectiles.atomic-artillery-projectile")
require("prototypes.projectiles.basic-railgun-projectile")
require("prototypes.projectiles.beacon-wave")
require("prototypes.projectiles.explosion-railgun-projectile")
require("prototypes.projectiles.explosion-turret-rocket-projectile")
require("prototypes.projectiles.heavy-explosive-rocket-projectile")
require("prototypes.projectiles.intergalactic-transceiver-wave")
require("prototypes.projectiles.laser-projectile")
require("prototypes.projectiles.matter-railgun-projectile")
require("prototypes.projectiles.matter-turret-rocket-projectile")
require("prototypes.projectiles.matter-wave")
require("prototypes.projectiles.nuclear-turret-rocket-projectile")
require("prototypes.projectiles.poop-projectile")
require("prototypes.projectiles.virus-capsule-projectile")

require("prototypes.recipes.advanced-chemistry")
require("prototypes.recipes.air-purification")
require("prototypes.recipes.atmosphere-condensation")
require("prototypes.recipes.bioprocessing")
require("prototypes.recipes.centrifuging")
require("prototypes.recipes.chemistry")
require("prototypes.recipes.crafting")
require("prototypes.recipes.crafting-with-fluid")
require("prototypes.recipes.crushing")
require("prototypes.recipes.electrolysis")
require("prototypes.recipes.fluid-filtration")
require("prototypes.recipes.fuel-refinery")
require("prototypes.recipes.growing")
require("prototypes.recipes.matter-deconversion")
require("prototypes.recipes.nuclear-fusion")
require("prototypes.recipes.oil-processing")
require("prototypes.recipes.smelting")
require("prototypes.recipes.stabilizer-charging")
require("prototypes.recipes.tech-cards")

require("prototypes.resources.imersite")
require("prototypes.resources.mineral-water")
require("prototypes.resources.rare-metals")

require("prototypes.remnants.advanced-radar-remnants")
require("prototypes.remnants.advanced-tank-remnants")
require("prototypes.remnants.antimatter-reactor-remnants")
require("prototypes.remnants.fusion-reactor-remnants")
require("prototypes.remnants.kr-big-random-pipes-remnants")
require("prototypes.remnants.kr-medium-random-pipes-remnants")
require("prototypes.remnants.matter-plant-remnants")
require("prototypes.remnants.advanced-transport-belt-remnants")
require("prototypes.remnants.advanced-underground-belt-remnants")
require("prototypes.remnants.advanced-splitter-remnants")
require("prototypes.remnants.superior-inserter-remnants")
require("prototypes.remnants.superior-splitter-remnants")
require("prototypes.remnants.superior-transport-belt-remnants")
require("prototypes.remnants.superior-underground-belt-remnants")
require("prototypes.remnants.turret-remnants")

require("prototypes.smokes.matter-smoke")
require("prototypes.smokes.poison-capsule-particle-smoke")
require("prototypes.smokes.poop-cloud")
require("prototypes.smokes.poop-cloud-visual-dummy")
require("prototypes.smokes.poop-particle-smoke")
require("prototypes.smokes.virus-cloud")
require("prototypes.smokes.virus-cloud-visual-dummy")
require("prototypes.smokes.virus-particle-smoke")

require("prototypes.technologies.trigger-tech")
require("prototypes.technologies.automation-science-pack")
require("prototypes.technologies.logistic-science-pack")
require("prototypes.technologies.chemical-science-pack")
require("prototypes.technologies.matter-tech-card")
require("prototypes.technologies.advanced-tech-card")
require("prototypes.technologies.production-science-pack")
require("prototypes.technologies.utility-science-pack")
require("prototypes.technologies.singularity-tech-card")
require("prototypes.technologies.space-age")

require("prototypes.technologies.optional")

require("prototypes.tiles.black-reinforced-plate")
require("prototypes.tiles.white-reinforced-plate")

require("prototypes.vehicles.advanced-tank")
require("prototypes.vehicles.nuclear-locomotive")

require("prototypes.compatibility.aircraft")
require("prototypes.compatibility.early-electric-furnaces")
require("prototypes.compatibility.squeak-through-2")

-- The code below has been made by Quezler Thanks
-- global table shared between all mods for compat
names_ignored_by_steel_pipes = util.list_to_map({
	"pipe",
})

data.raw["pipe-to-ground"]["kr-steel-pipe-to-ground"].fluid_box.pipe_connections[1].connection_category =
	"kr-steel-pipe"

for _, pipe_connection in ipairs(data.raw["pipe-to-ground"]["kr-steel-pipe-to-ground"].fluid_box.pipe_connections) do
	if (pipe_connection.connection_type or "normal") == "normal" then
		assert(pipe_connection.connection_category == "kr-steel-pipe")
		pipe_connection.connection_category = { "default", "kr-steel-pipe" }
	end
end
